<template>
	<view class="item">
		<switch :checked="completed" @change="(e) => $emit('comChange', e)" />
		<view class="">
			{{title}}
		</view>
		<button @click="$emit('delClick')">删除</button>
	</view>
</template>

<script>
	export default {
		name: "todo-item",
		props: ['title', 'completed'],
		emits: ['delClick', 'comChange'],
		data() {
			return {

			};
		}
	}
</script>

<style>
	
</style>